package com.winit.requirement.repository;

import com.winit.requirement.model.ReqDebunker;
import com.winit.requirement.model.ReqRemark;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface ReqDebunkRepository extends CrudRepository<ReqDebunker, String> {
    @Query(value = "select * from matrix_req_debunk where 1 = 1 and (?1 is null or  id = ?1)  and (?2 is null or req_id = ?2)and (?3 is null or is_improve = ?3)", nativeQuery = true)
    List<ReqDebunker> findByIdOrReqId(String id, String reqId, String isImprove);

}
